import { commonRequest } from '@/api/commonHttp';

// 存量管理-单据列表查询
export const getRecordListService = (data, loadingFn) => commonRequest({
  url: '/sysback/cpfrStockManager/getRecordList',
  type: 'post',
  data,
  loadingFn
});

// 库存管理-单据明细查询-报废申请单
export const getScrapRecordDetailService = (data, loadingFn) => commonRequest({
  url: '/sysback/cpfrStockManager/queryScrapReordDetail?recordNo=' + data,
  type: 'post',
  data,
  loadingFn
});

// 库存管理-单据明细查询-存量溢出处理：留存销售,打折退厂,内部促销类型的数据
export const getOtherRecordDetailService = (data, loadingFn) => commonRequest({
  url: '/sysback/cpfrStockManager/queryOtherReordDetail?recordNo=' + data,
  type: 'post',
  data,
  loadingFn
});

// 库存管理-选择行数据后，跳转到报废申请单页面
export const toCommitScrapRecordService = (data, loadingFn) => commonRequest({
  url: '/sysback/cpfrStockManager/toCommitScrapRecord',
  type: 'post',
  data,
  loadingFn
});

// 库存管理-提交报废申请单到Oa
export const commitScrapRecordToOaService = (data, loadingFn) => commonRequest({
  url: '/sysback/cpfrStockManager/commitScrapRecordToOa',
  type: 'post',
  data,
  loadingFn
});
